#include <51func.h>
int main(int argc, char *argv[])
{
    sigset_t mask;
    sigemptyset(&mask);
    sigaddset(&mask,SIGQUIT);
    sigset_t oldmask;

    sigprocmask(SIG_BLOCK,&mask,&oldmask);
    printf("Block 3\n");
    sleep(10);
    printf("sleep over!\n");
    sigset_t pending;
    sigpending(&pending);
    if(sigismember(&pending,SIGQUIT)){
        printf("3 is pending!\n");
    }
    else {
        printf("3 is not pending!\n");
    }
    sigprocmask(SIG_SETMASK,&oldmask,NULL);
    printf("Unblock 3\n");
    return 0;
}

